<?php
class ckUploadAction extends rareAction{
	public function execute(){
			if(empty($_GET['CKEditorFuncNum'])) 
				$this->mkhtml(1,"","错误的功能调用请求"); 
			$fn=$_GET['CKEditorFuncNum']; 
			$img = new Img($_FILES['upload']);
			$arr = $img->saveCKUpload();
			$this->mkhtml($fn,$arr['file'],$arr['msg']);
	}
	private function mkhtml($fn,$fileurl,$message){ 
		$str='<script type="text/javascript">window.parent.CKEDITOR.tools.callFunction('.$fn.', \''.$fileurl.'\', \''.$message.'\');</script>'; 
		exit($str); 
	} 	
}
?>
